﻿#region Copyright Notice
// 
// 
// Copyright (c) 2009-2010 Anindya Chatterjee
// 
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// 
//     http://www.apache.org/licenses/LICENSE-2.0
// 
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// 
// 
// 
#endregion
using System;
using System.ComponentModel;

namespace GCodeIssueTracker
{
    /// <summary>
    /// Represents the method that will handle the <see cref="ProjectHostingService.GetAllIssuesSummeryCompleted"/> event of <see cref="ProjectHostingService"/>.
    /// </summary>
    /// <param name="sender">The source of the event.</param>
    /// <param name="e">A <see cref="GetAllIssuesSummeryCompletedEventArgs"/> containing event data.</param>
    public delegate void GetAllIssuesSummeryCompletedEventHandler(object sender, GetAllIssuesSummeryCompletedEventArgs e
        );

    /// <summary>
    /// Provides data for the <see cref="ProjectHostingService.GetAllIssuesSummeryCompleted"/> event of a <see cref="ProjectHostingService"/>.
    /// </summary>
    public class GetAllIssuesSummeryCompletedEventArgs : AsyncCompletedEventArgs
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="GetAllIssuesSummeryCompletedEventArgs"/> class.
        /// </summary>
        /// <param name="feed">The <see cref="IssuesFeed"/> object.</param>
        /// <param name="error"> Any error that occurred during the asynchronous operation.</param>
        /// <param name="cancelled">A value indicating whether the asynchronous operation was canceled.</param>
        /// <param name="userState">A unique user state.</param>
        public GetAllIssuesSummeryCompletedEventArgs(IssuesFeed feed, Exception error, bool cancelled, object userState)
            : base(error, cancelled, userState)
        {
            IssuesFeed = feed;
        }

        /// <summary>
        /// Gets the <see cref="IssuesFeed"/> as a result of the asynchronous operation.
        /// </summary>
        /// <value>A <see cref="IssuesFeed"/>.</value>
        public IssuesFeed IssuesFeed { get; private set; }
    }
}